home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-08-25 | 12.2 KB | 263 lines | [TEXT/CWIE] |
- ========================================================================
- Metrowerks PowerPlant Networking Classes Release Notes
- ========================================================================
-
- Version: PowerPlant 1.9.2
- Date: 09 August 1998
- Author: Frank Vernon, Eric Scouten
- ========================================================================
-
- Request for comment:
-
- Since their release we have had sporadic requests that the
- PowerPlant Networking Classes be expanded to support other IP and,
- non-IP related protocols. Suggestions have included RawIP, AppleTalk,
- SOCKET style interfaces, and others. In addition, some have
- suggested dropping MacTCP support altogether and focusing instead
- on the advantages of the OpenTransport API.
-
- We are presently considering these as well as other networking
- related issues for future development. If you have any input on what
- you would like to see in terms of general network support for
- PowerPlant, please contact Metrowerks tech support with your
- suggestions.
-
-
- ========================================================================
- New Features in This Version
- ========================================================================
-
- * ICMP message handling for the UDP classes has been updated and
- improved for the CWPro4 release. ICMP messages are now handled
- like all other asynchronous and unexpected network events.
-
-
- ========================================================================
- Bugs Fixed in This Version
- ========================================================================
-
- * Fixed issue introduced with last release that prevented both MacTCP
- and OpenTransport code from being used in the same project.
-
- * Remove #pragma direct_destruction instructions. This no longer
- necessary for (nor supported by) the latest MW compilers. This was
- not a bug and will not effect any code you may have using these
- options. These options are now simply ignored by the compiler and
- thus the code was removed for completeness.
-
- * Fix to StOpenTptOperation::WaitForCompletion to prevent memory leak
- in the case of an exception within the routine.
-
-
- ========================================================================
- Known Bugs and Incompatibilities
- ========================================================================
-
- * NONE
-
-
- ========================================================================
- Additional Notes
- ========================================================================
-
- These new classes represent a radical shift from the pre-CW11 Networking
- Classes. Updates, possibly even entire code redesigns, will be necessary
- to any existing code bases using the old classes.
-
- To familiarize yourself with the new classes, it is suggested you read
- these release notes, review the architectural outline below, and closely
- study the included example code.
-
- The two included examples are SimpleServer and SimpleClient.
- SimpleClient is equivalent to the old PowerTelnet example. SimpleServer
- is essentially the same as the version included with the old Net
- Classes. You can use these two examples together (the client connecting
- to the server) to experiment with the various features of the new
- classes. Both of these examples have been updated to demonstrate basic
- UDP usage as well as TCP.
-
- NOTE: If you are testing the Client/Server combination with the
- client and server running on the same machine, you may have
- unpredictable results. It is recommended that you run these
- applications on separate machines.
-
- This is a brief outline of the major classes and concepts found in the
- new PowerPlant Networking Classes. Not all of the classes are described
- here. A brief description of each class is typically available at the
- top of each source file.
-
- The prefix 'Int_' in method names indicates methods which might be
- called at interrupt time. This is a convention that we hope will help
- you know where you should be careful setting break points in the debugger.
- All exposure in the public interfaces to interrupt time has been removed
- in the new classes. Where interrupt code couldn't be avoided however (for
- completion routines for instance) this convention has been used. If you
- find yourself in one of these routines while in the debbuger you should
- anticipate unusual and unreliable results.
-
- ===================== Changes from Pre-CW11 Classes ====================
-
- The most notable change in the new classes is the elimination of the
- "EventLoop" style notifier and, in fact, the entire notifier concept.
- Where notification of unexpected events is required, the standard
- PowerPlant Broadcast and Listen mechanism has been used. The new classes
- are entirely threaded and require the use of the PowerPlant Thread
- classes. These decisions have allowed us to greatly reduce both the
- amount and the complexity of the code that must be executed at interrupt
- time. In the new Networking Classes, your exposure to dealing with events
- at interrupt time is essentially eliminated.
-
- Another important omission from the new Net Classes is the concept of
- the Memory Pool. Since exposure to events at interrupt time is removed,
- much of the necessity for the Memory Pool has also been eliminated. The
- Memory Pool is still being used internally to handle messages generated
- at interrupt time, but its use is completely transparent to your
- applications. A single static pool is automatically created when
- necessary and deletes itself when no longer required. It is no longer
- necessary that you concern yourself with ensuring that your data will
- fit within an arbitrarily sized memory pool. You are free to allocate
- and deallocate memory using normal memory management techniques.
-
- The disconnect sequence on both MacTCP and OT is a little different from
- the old Networking Classes. We now have two calls: Disconnect and
- SendDisconnect which do different things. SendDisconnect will send a
- "orderly disconnect" and return immediately so you can continue to
- receive data. (We also have a RecieveDisconnect method to handle the
- other side of this equation.) Disconnect on the other hand will send an
- orderly disconnect and block the thread until the remote side has shut
- down. In addition, Disconnect is smart enough to call ReceiveDisconnect
- when necessary. In most instances, you will only need to call Disconnect
- when you are ready to close a connection. SendDisconnect, however,
- should allow people with more sophisticated send/receive requirements to
- handle one-sided connection closures properly.
-
- The "OT on 68k" defaults have been changed. We now check for OT version
- 1.1 and allow OT calls from 68k code. There is still a compile option
- for disabling this, but the default is now to use OT whenever possible.
-
- It is now possible to Abort almost any pending network operation under
- both MacTCP and OpenTransport. The method AbortThreadOperation() will
- abort the pending operation on the thread specified, resume the thread,
- and throw a Networking Classes specific error (Abort_Error.) Please note
- that neither MacTCP or OpenTransport really support the concept of
- aborting a pending network operation. This feature simply resumes your
- thread and knows how to handle the dangling event when the completion
- routine fires. Due to this, there are some instances where you may have
- to wait until the routine actually completes before you will be allowed
- to quit the application. The Networking classes handle these situations
- transparenlty however and no additional coding is required on your part
- to ensure compatibility.
-
- Timeouts (where applicable) are now implemented for both MacTCP and
- OpenTransport. As with the Abort feature above, since OpenTransport does
- not typically support the timeout concept, this feature simply resumes
- your thread and knows how to handle the dangling event when the
- completion routine fires. For consistency with both OpenTransport and
- MacTCP, timeout condition errors will all throw a Networking Classes
- specific error (Timeout_Error.)
-
- =========================== Public Interfaces ==========================
-
- LEndpoint- Encapsulates the idea of a "network endpoint," or one side of
- a two-way communication link. The endpoint is the object that is used to
- send or receive data over the network.
-
- LTCPEndpoint-
- LUDPEndpoint- These classes inherit from LEndpoint and represent TCP/IP
- and UDP style connections. An appropriate instance of one of these
- classes would be created as a representation of the local side the
- network connection.
-
- LInternetAddress- This class represents both IP and DNS style addresses.
- It will automatically map between DNS style and IP style addresses for
- you as necessary.
-
- UNetworkFactory- You will use this class to create network endpoints. It
- will choose the best configuration (i.e. MacTCP or OpenTransport) given
- the system software that is installed on the host machine.
-
- ==================== Internal Implementation Details ===================
-
- LInternetMapper- Encapsulates the idea of the domain name server for
- Internet hosts. The mapper is the object that is used to find the
- address of another computer on the network. This is used primarily by
- LNetworkAddress to convert addresses for you behind the scenes. Most if
- not all DNS operations will be transparent, under normal circumstances,
- through the use of a LInternetAddress object.
-
- UMacTCPSupport-
- UOpenTptSupport- Utility classes for handling MacTCP and OpenTransport
- specific functions.
-
- LMacTCPEndpoint-
- LOpenTptEndpoint- A representation of a LTCPEndpoint that uses either
- MacTCP or OpenTransport. One of these will typically be created for you
- when you use UNetworkFactory to create an endpoint.
-
- LMacTCPInetMapper-
- LOpenTptInetMapper- A representation of a LInternetMapper that uses
- either MacTCP or OpenTrasport. Again use of these classes is transparent
- through the use of LInternetAddress.
-
- StAsyncOperation- Encapsulates the idea of a single network operation
- and is primarily responsible for blocking/resuming the communication
- thread as necessary. This is used internally by the Net Classes and you
- would not normally ever work directly with an object of this type.
- Almost all activities that might need to happen at interrupt time are
- handled within classes of this type.
-
- StMacTCPTCPOperation-
- LMacTCPDNSOperation-
- StMacTCPUDPOperation-
- StOpenTptOperation- Representations of StAsyncOperation for MacTCP and
- OpenTransport. Since MacTCP and OpenTransport work in fundamentally
- different fashions, the actual operation of these classes is
- significantly different. The use of these classes is transparent under
- normal circumstances. Note that for technical reasons associated with
- aborting DNS operations, the class LMacTCPDNSOperation is NOT stack safe
- unlike the other classes in this category.
-
- A new feature allows local caching of canonical names and IP
- addresses that will be searched before a DNS server is queried.
- This gives you the ability to specify specific name and address
- mappings if necessary and may improve performance in some
- instances.
-
- Usage:
- This feature is normally disabled. Two #defines in
- LInternetMapper.h control its operation.
- DNS_USECACHE - If set to a non-zero value will cause all
- DNS lookups to check the local cache before attempting
- to query a DNS server for address resolution.
-
- DNS_CACHELOOKUPS - If set to a non-zero value will cause all
- DNS lookups returned from a DNS server to be added to
- the local cache.
-
- NOTE: Please be careful using the DNS_CACHELOOKUPS
- feature as it will circumvent dynamic name
- servers and thus may reduce performance on
- those sites.
-
- To add mappings to the cache use UDNSCache::AddToDNSCache(). This
- function allows you to maintain and dynamically load you own local
- hosts tables.
-
-
- ========================================================================
- Contacting Metrowerks
- ========================================================================
-
- For bug reports, technical questions, and suggestions, please use the
- forms in the Release Notes folder on the CD, and send them to
-
- support@metrowerks.com
-
- See the CodeWarrior on the Nets document in the Release Notes folder for
- more contact information, including a list of Internet newsgroups,
- online services, and patch and update sites.
-
- ========================================================================
-
- Metrowerks Corporation
-